package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SchooldormitoryMapper;
import com.ruoyi.system.domain.Schooldormitory;
import com.ruoyi.system.service.ISchooldormitoryService;
import com.ruoyi.common.core.text.Convert;

/**
 * 宿舍管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-11-08
 */
@Service
public class SchooldormitoryServiceImpl implements ISchooldormitoryService 
{
    @Autowired
    private SchooldormitoryMapper schooldormitoryMapper;

    /**
     * 查询宿舍管理
     * 
     * @param dormitoryText 宿舍管理主键
     * @return 宿舍管理
     */
    @Override
    public Schooldormitory selectSchooldormitoryByDormitoryText(String dormitoryText)
    {
        return schooldormitoryMapper.selectSchooldormitoryByDormitoryText(dormitoryText);
    }

    /**
     * 查询宿舍管理列表
     * 
     * @param schooldormitory 宿舍管理
     * @return 宿舍管理
     */
    @Override
    public List<Schooldormitory> selectSchooldormitoryList(Schooldormitory schooldormitory)
    {
        return schooldormitoryMapper.selectSchooldormitoryList(schooldormitory);
    }

    /**
     * 新增宿舍管理
     * 
     * @param schooldormitory 宿舍管理
     * @return 结果
     */
    @Override
    public int insertSchooldormitory(Schooldormitory schooldormitory)
    {
        return schooldormitoryMapper.insertSchooldormitory(schooldormitory);
    }

    /**
     * 修改宿舍管理
     * 
     * @param schooldormitory 宿舍管理
     * @return 结果
     */
    @Override
    public int updateSchooldormitory(Schooldormitory schooldormitory)
    {
        return schooldormitoryMapper.updateSchooldormitory(schooldormitory);
    }

    /**
     * 批量删除宿舍管理
     * 
     * @param dormitoryTexts 需要删除的宿舍管理主键
     * @return 结果
     */
    @Override
    public int deleteSchooldormitoryByDormitoryTexts(String dormitoryTexts)
    {
        return schooldormitoryMapper.deleteSchooldormitoryByDormitoryTexts(Convert.toStrArray(dormitoryTexts));
    }

    /**
     * 删除宿舍管理信息
     * 
     * @param dormitoryText 宿舍管理主键
     * @return 结果
     */
    @Override
    public int deleteSchooldormitoryByDormitoryText(String dormitoryText)
    {
        return schooldormitoryMapper.deleteSchooldormitoryByDormitoryText(dormitoryText);
    }
}
